/* tslint:disable */
/* eslint-disable */
/**
 * Deepfence ThreatMapper
 * Deepfence Runtime API provides programmatic control over Deepfence microservice securing your container, kubernetes and cloud deployments. The API abstracts away underlying infrastructure details like cloud provider,  container distros, container orchestrator and type of deployment. This is one uniform API to manage and control security alerts, policies and response to alerts for microservices running anywhere i.e. managed pure greenfield container deployments or a mix of containers, VMs and serverless paradigms like AWS Fargate.
 *
 * The version of the OpenAPI document: v2.5.3
 * Contact: community@deepfence.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists, mapValues } from '../runtime';
/**
 * 
 * @export
 * @interface ModelCloudResource
 */
export interface ModelCloudResource {
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    account_id: string;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    cloud_compliance_latest_scan_id: string;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    cloud_compliance_scan_status: string;
    /**
     * 
     * @type {number}
     * @memberof ModelCloudResource
     */
    cloud_compliances_count: number;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    cloud_provider: ModelCloudResourceCloudProviderEnum;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    cloud_region: string;
    /**
     * 
     * @type {number}
     * @memberof ModelCloudResource
     */
    cloud_warn_alarm_count: number;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    node_id: string;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    node_name: string;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    node_type: string;
    /**
     * 
     * @type {string}
     * @memberof ModelCloudResource
     */
    type_label: string;
}


/**
 * @export
 */
export const ModelCloudResourceCloudProviderEnum = {
    Aws: 'aws',
    Gcp: 'gcp',
    Azure: 'azure'
} as const;
export type ModelCloudResourceCloudProviderEnum = typeof ModelCloudResourceCloudProviderEnum[keyof typeof ModelCloudResourceCloudProviderEnum];


/**
 * Check if a given object implements the ModelCloudResource interface.
 */
export function instanceOfModelCloudResource(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "account_id" in value;
    isInstance = isInstance && "cloud_compliance_latest_scan_id" in value;
    isInstance = isInstance && "cloud_compliance_scan_status" in value;
    isInstance = isInstance && "cloud_compliances_count" in value;
    isInstance = isInstance && "cloud_provider" in value;
    isInstance = isInstance && "cloud_region" in value;
    isInstance = isInstance && "cloud_warn_alarm_count" in value;
    isInstance = isInstance && "node_id" in value;
    isInstance = isInstance && "node_name" in value;
    isInstance = isInstance && "node_type" in value;
    isInstance = isInstance && "type_label" in value;

    return isInstance;
}

export function ModelCloudResourceFromJSON(json: any): ModelCloudResource {
    return ModelCloudResourceFromJSONTyped(json, false);
}

export function ModelCloudResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelCloudResource {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'account_id': json['account_id'],
        'cloud_compliance_latest_scan_id': json['cloud_compliance_latest_scan_id'],
        'cloud_compliance_scan_status': json['cloud_compliance_scan_status'],
        'cloud_compliances_count': json['cloud_compliances_count'],
        'cloud_provider': json['cloud_provider'],
        'cloud_region': json['cloud_region'],
        'cloud_warn_alarm_count': json['cloud_warn_alarm_count'],
        'node_id': json['node_id'],
        'node_name': json['node_name'],
        'node_type': json['node_type'],
        'type_label': json['type_label'],
    };
}

export function ModelCloudResourceToJSON(value?: ModelCloudResource | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'account_id': value.account_id,
        'cloud_compliance_latest_scan_id': value.cloud_compliance_latest_scan_id,
        'cloud_compliance_scan_status': value.cloud_compliance_scan_status,
        'cloud_compliances_count': value.cloud_compliances_count,
        'cloud_provider': value.cloud_provider,
        'cloud_region': value.cloud_region,
        'cloud_warn_alarm_count': value.cloud_warn_alarm_count,
        'node_id': value.node_id,
        'node_name': value.node_name,
        'node_type': value.node_type,
        'type_label': value.type_label,
    };
}

